<?php
class FileModel extends MongoModel {
	var $table = 'file';
    var $name = '文件';
	
	public static function get_type_by_name($name){
		switch ($name){
			case 'image' : 
				return 1;
			case 'video':
				return 2;
			default:
				return 0;
		}
	}
	
	public static function get_types(){
		return array(
			'' => '未知分类',
			'image' => '图片',
			'video' => '视频'
		);
	}
}

?>